package com.riteny.mybatis.generate;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @author Riteny
 * 2021/1/8  10:17
 */
public class CommonConnectionFactory {

    public static Connection getConnection(String driveClass, String jdbcUrl, String username, String password) throws ClassNotFoundException, SQLException {

        Class.forName(driveClass);

        Connection connection = DriverManager.getConnection(jdbcUrl, username, password);

        return connection;
    }

}
